package demo2;
import demo.Base;

public class Add extends Base{
    private int z;
    public Add(int x, int y, int z) {
        super(x, y);
        this.z = z;
    }
    public int getZ() {
        return this.z;
    }
    public int calculate() {
        return super.getX() + super.getY() + this.getZ();
    }
    public void test() {
        System.out.println(super.x);
        System.out.println(super.y);
    }
}
